package crawler.net;

import com.alibaba.fastjson.JSONObject;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.HttpClients;

import java.util.List;

/**
 * @description:
 * @author: 张德长 dechang.zhang@ucarinc.com
 * @date: 10:36:57 2018/11/8
 * @version:2.0
 */
public class Net {
    HttpClient defaultClient = HttpClients.createDefault();
    Net defaultNet = new Net();

    public Net getDefaultInstance() {
        return defaultNet;
    }

    public Net getNewInstance() {
        return new Net();
    }

    public String getRequest(String url) {
        return null;
    }

    public String postRequest(String url, List<NameValuePair> list) {
        return null;
    }

    public String postJsonRequest(String url, JSONObject jsonParam) {
        return null;
    }
}
